package cn.com.taiji.oospub.wechat.common.wxpay.pay;

/**
 * User: rizenguo
 * Date: 2014/10/29
 * Time: 14:40
 * 这里放置各种配置数据
 */
public class Configure_online {
//这个就是自己要保管好的私有Key了（切记只能放在自己的后台代码里，不能放在任何可能被看到源代码的客户端程序中）
	// 每次自己Post数据给API的时候都要用这个key来对所有字段进行签名，生成的签名会放在Sign这个字段，API收到Post数据的时候也会用同样的签名算法对Post过来的数据进行签名和验证
	// 收到API的返回的时候也要用这个key来对返回的数据算下签名，跟API的Sign数据进行比较，如果值不一致，有可能数据被第三方给篡改
	
	public static String TradeType_GZH = "JSAPI";
	

	//------------------aramark在线--------------
	public static String key = "sdekdib83jd84jd3mf92orid8bkd90zx";

	//微信分配的公众号ID（开通公众号之后可以获取到）
	public static String appID = "wx2faec6d97bb8d50a";

	//微信支付分配的商户号ID（开通公众号的微信支付功能之后可以获取到）
	public static String mchID = "1316199301";

	public static String appsecret = "ed4a837d65d26018e4eb96cc1006c078";
	//订单提醒
	public static String Template_id="FHHjQR8mzB5uFmLsOD3zfMH3oNql3WzB0MoVKa0I8eQ";
	//退款通知
	public static String Template_tuiKun_id= "ai8_7RdR06tECeGwuAwJj9NbJD7UyM4uONkDRNEHk5A";
	//预订提醒通知
	public static String Template_jieCan_id= "4ArKG3uZH-isbo3wekeHWXWvC_Fe_G7DDB_Jrc6TH4I";
	//取餐通知
	public static String Template_quCan_id= "e5oRszddd09r5cQ1JxS6e37CVgFtDDsvvgHto4XY4kQ";
	//消费通知
	public static String Template_xiaoFeiTongZhi_id= "Sg6nxceXxd0TZwrmJr4oqj0-fvOvnnYwRNAc4Fj9z38";
	//订单支付成功通知
	public static String Template_dingDangZhifu_id = "aZSHCy-MhBmJlA1AqkdmDOy2_2FwaUKxat1FsWMLe-E";
	
	
	
	/*
	
	//------------------健康信息--------------
	public static String key = "aramarkbeijing010aramarkbeijing0";

	//微信分配的公众号ID（开通公众号之后可以获取到）
	public static String appID = "wxc4db81071f5156c8";

	public static String appsecret = "db64920f27d8e2cffa89e50ccaf76610";
	//微信支付分配的商户号ID（开通公众号的微信支付功能之后可以获取到）
	public static String mchID = "1372009502";

	//订单提醒
	public static String Template_id="FHHjQR8mzB5uFmLsOD3zfMH3oNql3WzB0MoVKa0I8eQ";
	//退款通知
	public static String Template_tuiKun_id= "ai8_7RdR06tECeGwuAwJj9NbJD7UyM4uONkDRNEHk5A";
	//预订提醒通知
	public static String Template_jieCan_id= "4ArKG3uZH-isbo3wekeHWXWvC_Fe_G7DDB_Jrc6TH4I";
	//取餐通知
	public static String Template_quCan_id= "e5oRszddd09r5cQ1JxS6e37CVgFtDDsvvgHto4XY4kQ";
	//消费通知
	public static String Template_xiaoFeiTongZhi_id= "Sg6nxceXxd0TZwrmJr4oqj0-fvOvnnYwRNAc4Fj9z38";
	//订单支付成功通知
	public static String Template_dingDangZhifu_id = "aZSHCy-MhBmJlA1AqkdmDOy2_2FwaUKxat1FsWMLe-E";
	
	
	*/
	
	//受理模式下给子商户分配的子商户号
	private static String subMchID = "";

	//HTTPS证书的本地路径
	private static String certLocalPath = "";

	//HTTPS证书密码，默认密码等于商户号MCHID
	private static String certPassword = "";

	//是否使用异步线程的方式来上报API测速，默认为异步模式
	private static boolean useThreadToDoReport = true;

	//机器IP
	private static String ip = "";
	//消息模板id   

	//以下是几个API的路径：
	//1）被扫支付API
//	public static String PAY_API = "https://api.mch.weixin.qq.com/pay/micropay";
	public static String PAY_API = "https://api.mch.weixin.qq.com/pay/unifiedorder";

	//2）被扫支付查询API
	public static String PAY_QUERY_API = "https://api.mch.weixin.qq.com/pay/orderquery";

	//3）退款API
	public static String REFUND_API = "https://api.mch.weixin.qq.com/secapi/pay/refund";

	//4）退款查询API
	public static String REFUND_QUERY_API = "https://api.mch.weixin.qq.com/pay/refundquery";

	//5）撤销API
	public static String REVERSE_API = "https://api.mch.weixin.qq.com/secapi/pay/reverse";

	//6）下载对账单API
	public static String DOWNLOAD_BILL_API = "https://api.mch.weixin.qq.com/pay/downloadbill";

	//7) 统计上报API
	public static String REPORT_API = "https://api.mch.weixin.qq.com/payitil/report";

	//8) 模板发送API_orderSend类使用
	public final static String SEND_TEMPLAYE_MESSAGE_URL = "https://api.weixin.qq.com/cgi-bin/message/template/send?access_token=ACCESS_TOKEN";  
	
	//9) 获取token的API_WeiXinNotify类使用
	public final static  String requestUrl = "https://api.weixin.qq.com/cgi-bin/token?grant_type=client_credential&appid=APPID&secret=APPSECRET";
   	
	public static boolean isUseThreadToDoReport() {
		return useThreadToDoReport;
	}

	public static void setUseThreadToDoReport(boolean useThreadToDoReport) {
		Configure_online.useThreadToDoReport = useThreadToDoReport;
	}

	public static String HttpsRequestClassName = "com.tencent.common.HttpsRequest";

	public static void setKey(String key) {
		Configure_online.key = key;
	}

	public static void setAppID(String appID) {
		Configure_online.appID = appID;
	}

	public static void setMchID(String mchID) {
		Configure_online.mchID = mchID;
	}

	public static void setSubMchID(String subMchID) {
		Configure_online.subMchID = subMchID;
	}

	public static void setCertLocalPath(String certLocalPath) {
		Configure_online.certLocalPath = certLocalPath;
	}

	public static void setCertPassword(String certPassword) {
		Configure_online.certPassword = certPassword;
	}

	public static void setIp(String ip) {
		Configure_online.ip = ip;
	}

	public static String getKey(){
		return key;
	}
	
	public static String getAppid(){
		return appID;
	}
	
	public static String getMchid(){
		return mchID;
	}

	public static String getSubMchid(){
		return subMchID;
	}
	
	public static String getCertLocalPath(){
		return certLocalPath;
	}
	
	public static String getCertPassword(){
		return certPassword;
	}

	public static String getIP(){
		return ip;
	}

	public static void setHttpsRequestClassName(String name){
		HttpsRequestClassName = name;
	}

	public static String getAppsecret() {
		return appsecret;
	}

	public static void setAppsecret(String appsecret) {
		Configure_online.appsecret = appsecret;
	}

}
